Skip to content

Conversation

@jonahgraham
Copy link
Contributor

AllWidgetTests was missing a bunch of tests, some of them seem not
very consequential (simple listener tests such as for example
Test_org_eclipse_swt_custom_VerifyKeyListener

But other ones seem to test important functionality and are rather
more substantial, such as Test_org_eclipse_swt_widgets_TreeColumn

There are a few test classes which are super classes of other test classes
and exist to match all the SWT classes. These have been marked as abstract
so that it is obvious why they are not included. If you had try to run them
they would have mostly failed. The secondary advantage of explicitly
marking them abstract is that JDT won't run them as a test from within
Eclipse IDE.

There are three test classes that don't pass, I have added them to the
list commented out for now, but if they are easy enough to resolve I
will enable them too.

Fixes #2542

@jonahgraham
Copy link
Contributor Author

jonahgraham commented Sep 24, 2025

Note that this PR has two commits - I added a formatting/sorting commit before adding the missing tests. The substantial part of this PR is 40a7de0

@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2025

Test Results

  118 files  ±  0    118 suites  ±0   10m 12s ⏱️ -4s
4 573 tests +133  4 553 ✅ +133  17 💤 ±0  3 ❌ ±0 
  298 runs  ±  0    291 ✅ ±  0   4 💤 ±0  3 ❌ ±0 

For more details on these failures, see this check.

Results for commit 5f08af7. ± Comparison against base commit 810cbcc.

♻️ This comment has been updated with latest results.

@jonahgraham
Copy link
Contributor Author

I fixed a couple of the bitrotten tests. But Test_org_eclipse_swt_widgets_CoolItem is more complicated (to me) because it is about layouts and computing sizes. I am unsure whether my platform is the best one to work on that.

@jonahgraham
Copy link
Contributor Author

Reading the test output it look like most of the test failures are the KeyEvent issue highlighted in #2516

However the newly enabled test shows a problem on mac as test_getWidth (org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TreeColumn) fails on both mac x86_64 and aarch64

Interestingly the same test on TableColumn seems to work fine. So perhaps some code has been fixed on macos for TableColumn but not TreeColumn which I would have thought would be very similar code.

Also formats them so that they can be automatically formatted easily
in the future with JDT Formatter by forcing line breaks with `//`

The [AnyEdit Tools](https://marketplace.eclipse.org/content/anyedit-tools)
can be used to sort the list in the future.

This is being done to make it easier to identify if tests are missing
from the lists.
AllWidgetTests was missing a bunch of tests, some of them seem not
very consequential (simple listener tests such as for example
[Test_org_eclipse_swt_custom_VerifyKeyListener](https://github.com/eclipse-platform/eclipse.platform.swt/blob/d5dc66178647fa40b14165a7b54bc3be8e013174/tests/org.eclipse.swt.tests/JUnit%20Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_VerifyKeyListener.java)

But other ones seem to test important functionality and are rather
more substantial, such as [Test_org_eclipse_swt_widgets_TreeColumn](https://github.com/eclipse-platform/eclipse.platform.swt/blob/d5dc66178647fa40b14165a7b54bc3be8e013174/tests/org.eclipse.swt.tests/JUnit%20Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TreeColumn.java)

There are a few test classes which are super classes of other test classes
and exist to match all the SWT classes. These have been marked as abstract
so that it is obvious why they are not included. If you had try to run them
they would have mostly failed. The secondary advantage of explicitly
marking them abstract is that JDT won't run them as a test from within
Eclipse IDE.

There are three test classes that don't pass, I have added them to the
list commented out for now, but if they are easy enough to resolve I
will enable them too.

Fixes #2542
Removed the part of the test that now fails. A specific combination
of segments used to cause an exception, but between the pair of
commits d3c0efa and
b4dfa25 this no longer causes an exception.
Therefore I proceeded to remove the invalid test.
This test had bitrotten significantly since it was written a long
time ago. This commit fixes the behaviour by making test implementation
of StyledTextContent behave reasonably so that other StyledText
operations can complete successfully.
Test_org_eclipse_swt_widgets_TreeColumn had been missing from the
SWT test suite since the test was created. The test_getWidth
fails on macOS so it has been disabled. It is unknown how long it
has been failing for.
Copy link
Member

@akurtakov akurtakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@akurtakov
Copy link
Member

Failing windows tests are tracked in #2516

@akurtakov akurtakov merged commit f38e115 into eclipse-platform:master Sep 25, 2025
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not all SWT tests are running in the suite

2 participants